const CracoLessPlugin = require('craco-less');

module.exports = {
  devServer: {
    proxy: {
      "/api": {
        target: "http://192.168.137.207:4000",
        pathRewrite(path) {
          return path.replace('/api', '/').replace('.action', '.json')
        }
      }
    }
  },
  plugins: [
    {
      plugin: CracoLessPlugin,
      options: {
        lessLoaderOptions: {
          lessOptions: {
            modifyVars: { '@primary-color': '#1DA57A' },
            javascriptEnabled: true,
          },
        },
      },
    },
  ]
};